<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
    }

    ul {
        margin: 100px;
    }

    ul li {
        margin: 0 5px;
        width: 120px;
        height: 35px;
        list-style: none;
        perspective: 500px;

    }

    .box {
        position: relative;
        width: 100%;
        height: 100%;
        perspective: 1000px;
        transform-style: preserve-3d;
        transition: all .4s;
    }

    .front,
    .back {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
    }

    .front {
        background-color: pink;

        z-index: 1;
        /* backface-visibility: hidden; */
        transform: translateZ(17.5px);
    }

    .back {
        background-color: rgb(83, 7, 20);

        transform: translateY(17.5px) rotateX(-90deg);
    }

    .box:hover {
        transform: rotateX(90deg);
    }
</style>

<body>
    <ul>
        <li>
            <div class="box">
                <div class="front">黑马程序员</div>
                <div class="back">pink老师在等你</div>
            </div>
        </li>
        <li>
            <div class="box">
                <div class="front">黑马程序员</div>
                <div class="back">pink老师在等你</div>
            </div>
        </li>
        <li>
            <div class="box">
                <div class="front">黑马程序员</div>
                <div class="back">pink老师在等你</div>
            </div>
        </li>
        <li>
            <div class="box">
                <div class="front">黑马程序员</div>
                <div class="back">pink老师在等你</div>
            </div>
        </li>
        <li>
            <div class="box">
                <div class="front">黑马程序员</div>
                <div class="back">pink老师在等你</div>
            </div>
        </li>
        <li>
            <div class="box">
                <div class="front">黑马程序员</div>
                <div class="back">pink老师在等你</div>
            </div>
        </li>
    </ul>
</body>

</html>